package com.Maykk.Demo05;

/**
 * @ClassName: DemoTest
 * @Description: TODO
 * @Author: MaykkStar@163.com
 */
public class DemoTest {
    public static void main(String[] args) {
        MyRunnable myRun = new MyRunnable();
        Thread th01 = new Thread(myRun,"线程1");
        Thread th02 = new Thread(myRun,"线程2");

        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 30; i++) {
                    System.out.println(Thread.currentThread().getName() + "i = " + i);
                }
            }
        }).start();

        th01.start();
        th02.start();
    }
}
